﻿using System.Collections.Generic;

namespace LocalOverride.Fiddler.Store
{
    public class ValidationResult
    {
        public static ValidationResult Valid = new ValidationResult(true, new ErrorNotification[0]);
        public IEnumerable<ErrorNotification> Errors { get; private set; }
        public bool IsValid { get; private set; }
        
        public ValidationResult(bool isValid, IEnumerable<ErrorNotification> errors)
        {
            IsValid = isValid;
            Errors = errors;
        }

        public ValidationResult(bool isValid, ErrorNotification error)
        {
            IsValid = isValid;
            Errors = new[] {error};
        }
    }
}